<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>userList</title>
    <link th:href="@{/css/bootstrap.css}" rel="stylesheet"></link>
    <script th:src="@{/jquery.min.js}" type="text/javascript"></script>
    <script th:src="@{~/js/user.js}" type="text/javascript"></script>
</head>

<body class="container">
<br/>
<h1><a th:href="@{/listPage}">用户列表</a></h1>
<br/><br/>
<div class="with:80%">
    <table class="table table-hover" border="1">
      <thead>
        <tr>
            <th>ID主键</th>
            <th>用户名</th>
            <th>密码</th>
            <th>邮箱</th>
            <th>电话</th>
            <th>性别</th>
            <th colspan="2">出生年月</th>
            <th colspan="2">注册时间</th>
            <th>修改用户</th>
            <th>删除用户</th>
        </tr>
	  </thead>
        <tbody>
        <tr  th:each="user : ${userpage}">
            <td scope="row" th:text="${user.id}"></td>
            <td th:text="${user.username}"></td>
            <td th:text="${user.password}"></td>
            <td th:text="${user.email}"></td>
            <td th:text="${user.phone}"></td>
            <td th:text="${user.sex}"></td>
            <td th:text="${user.birthday}" colspan="2"></td>
            <td th:text="${user.regtime}" colspan="2"></td>
            <td><a th:href="@{/toEdit(id=${user.id})}">修改</a></td>
            <td><a th:href="@{/delete(id=${user.id})}">删除</a></td>
        </tr>
        </tbody>
    </table>
</div>
<!-- 列表分页的DIV,由JS动态填充内容-->
<!-- <ul class="pagination pagination-lg" id="link" th:each="pageNum :${#numbers.sequence(1,userpage.totalPages)}">
	<li>
		<a th:href="@{/listPage(pageNum=${pageNum})}" th:text="${pageNum}"></a>
	</li> -->

</body>
<script type="text/javascript" th:inline="javascript">
</script>
</html>